package cloudPayAdmin.admin.service.traffic;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import cloudPayAdmin.admin.dbapp.entity.traffic.TVideo;
import cloudPayAdmin.admin.dbapp.repo.traffic.VideoRepo;

@Service
@Transactional
public class VideoService {
	
	@Autowired
	VideoRepo videoRepo;
	
	@Transactional(readOnly=true)
	public TVideo findById(Long videoId) {
		return videoRepo.findOne(videoId);
	}
	
	public TVideo save(TVideo video) {
		return videoRepo.save(video);
	}
}
